#include <stdio.h>
#include "isLeapYear.h"
#include "SumDays.h"
#include "Week.h"
#include "printf.h"

void printfData(int month, int year)
{
	printf("month:%d   year:%d",month,year);
	printf("\n");
	int a[2][12] ={31,28,31,30,31,30,31,31,30,31,30,31,31,29,31,30,31,30,31,31,30,31,30,31};
	printf("SN MO TU WE TH FR ST\n");
	int first = Week(month,year);
	int i;
	for(i = 0;i < first;++i)
	{
		printf("   ");
	}
	for(i = 0;i < a[isLeapYear(year)][month - 1];++i)
	{
		printf("%-2d ",i+1);
		if((i + 1 + first) % 7 == 0)
		{
			printf("\n\n");
		}
	}
	printf("\n\n");
}
